<div>
    <div class="m-subheader">
        <div class="row align-items-center">
            <div class="mr-auto col-auto">
                <h3 class="m-subheader__title m-subheader__title--separator">
                    <span>交货确认信息</span>
                </h3>
                <span class="m-section__sub">
                    获取交货确认单
                </span>
            </div>
        </div>
    </div>
    <div class="m-content">
        <div class="m-portlet m-portlet--mobile" style="margin: 0;">
            <div class="m-portlet__body" style="height: 724px;">
                <form class="horizontal-form" autocomplete="off">
                    <div class="m-form m-form--label-align-right">
                        <div class="row align-items-center m--margin-bottom-10">
                            <div class="col-xl-12" style="padding: 0;">
                                <div class="form-group m-form__group align-items-center">
                                    <div class="input-group">
                                        <input [(ngModel)]="filterText" name="filterText" autoFocus class="form-control m-input"
                                            [placeholder]="l('SearchWithThreeDot')" type="text">
                                        <span class="input-group-btn">
                                            <button (click)="getDeliveryOrderList()" class="btn btn-primary" type="submit"><i
                                                    class="flaticon-search-1" [attr.aria-label]="l('Search')"></i></button>
                                            <button class="btn btn-success" (click)="exportToexcel()"><i class="far fa-file-excel"></i>导出</button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row m--margin-bottom-10" [hidden]="!advancedFiltersAreShown">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="DisplayName">验收开始时间 </label>
                                    <input pInputText type="text" class="form-control m-input" style='width:100%;' name='startDate'
                                        [(ngModel)]="startDate" bsDatepicker>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="DisplayName">验收结束时间 </label>
                                    <input pInputText type="text" class="form-control m-input" style='width:100%;' name='endDate'
                                        [(ngModel)]="endDate" bsDatepicker>
                                </div>
                            </div>

                        </div>

                        <div class="row margin-bottom-10" *ngIf="advancedFiltersAreShown">
                            <div class="col-sm-12 text-right">
                                <button class="btn btn-metal" (click)="getDeliveryOrderList()"><i class="fa fa-sync"></i>刷新</button>
                            </div>
                        </div>
                        <div class="row margin-bottom-10">
                            <div class="col-sm-12">
                                <span class="clickable-item text-muted" *ngIf="!advancedFiltersAreShown" (click)="advancedFiltersAreShown=!advancedFiltersAreShown"><i
                                        class="fa fa-angle-down"></i> {{"ShowAdvancedFilters" | localize}}</span>
                                <span class="clickable-item text-muted" *ngIf="advancedFiltersAreShown" (click)="advancedFiltersAreShown=!advancedFiltersAreShown"><i
                                        class="fa fa-angle-up"></i> {{"HideAdvancedFilters" | localize}}</span>
                            </div>
                        </div>
                    </div>
                </form>
                <div class="row align-items-center">
                    <!--<Primeng-TurboTable-Start>-->
                    <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
                        <p-table #dataTable (onLazyLoad)="getDeliveryOrderList($event)" [value]="primengTableHelper.records"
                            rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false" [lazy]="true"
                            [scrollable]="true" ScrollWidth="100%" [responsive]="primengTableHelper.isResponsive"
                            [resizableColumns]="primengTableHelper.resizableColumns">
                            <ng-template pTemplate="header">
                                <tr>
                                    <th style="width: 50px">
                                        序号
                                    </th>
                                    <th style="width: 180px">
                                        申请单编号
                                    </th>
                                    <th style="width: 150px">
                                        加工单编号
                                    </th>
                                    <th style="width: 150px">
                                        确认单编号
                                    </th>
                                    <th style="width: 150px">
                                        任务号
                                    </th>
                                    <th style="width: 150px">
                                        产品图号
                                    </th>
                                    <th style="width: 150px">
                                        产品名称
                                    </th>
                                    <th style="width: 120px">
                                        验收日期
                                    </th>
                                    <th style="width: 100px">
                                        验收数量
                                    </th>
                                    <th style="width: 120px">
                                        合格/超差/报废
                                    </th>
                                    <th style="width: 160px">
                                        质控卡编号
                                    </th>
                                    <th style="width: 200px">
                                        供方单位
                                    </th>
                                    <th style="width: 80px">
                                        是否逾期
                                    </th>
                                    <th style="width: 80px">
                                        逾期天数
                                    </th>
                                    <th style="width: 230px">
                                        备注
                                    </th>

                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-record="$implicit" let-ri='rowIndex'>
                                <tr>
                                    <td style="width: 50px; text-align: center;">
                                        {{ ri + 1}}
                                    </td>
                                    <th style="width: 180px">
                                        {{ record.requisitionCode }}
                                    </th>
                                    <th style="width: 150px">
                                        {{ record.orderCode }}
                                    </th>
                                    <th style="width: 150px">
                                        {{ record.deliveryCode }}
                                    </th>
                                    <th style="width: 150px">
                                        {{ record.taskCode }}
                                    </th>
                                    <th style="width: 150px">
                                        {{ record.picNo }}
                                    </th>
                                    <th style="width: 150px">
                                        {{ record.taskName }}
                                    </th>
                                    <th style="width: 120px">
                                        {{record.deliveryDate | momentFormat:'L'}}
                                    </th>
                                    <th style="width: 100px">
                                        {{ record.deliveryAmount }}
                                    </th>
                                    <th style="width: 120px; text-align: center;">
                                        {{ record.passedAmount }}/ {{ record.quantityAmount }}/ {{
                                        record.noPassedAmount }}
                                    </th>
                                    <th style="width: 160px">
                                        {{ record.qualityControlCardNo }}
                                    </th>
                                    <th style="width: 200px">
                                        {{ record.supplierUnit}}
                                    </th>
                                    <th style="width: 80px">
                                        <div [ngSwitch]="record.isOverdue">
                                            <div *ngSwitchCase="">
                                                <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                                            </div>
                                            <div *ngSwitchDefault>
                                                <span *ngIf="record.isOverdue == true" class="label m-badge m-badge--success m-badge--wide"
                                                    data-toggle="tooltip" title="是" data-placement="top">
                                                    是
                                                </span>
                                                <span *ngIf="record.isOverdue == false" class="label m-badge m-badge--metal m-badge--wide"
                                                    data-toggle="tooltip" title="否" data-placement="top">
                                                    否
                                                </span>
                                            </div>
                                        </div>
                                    </th>
                                    <th style="width: 80px">
                                        <div [ngSwitch]="record.overdueDay">
                                            <div *ngSwitchCase="">
                                                <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                                            </div>
                                            <div *ngSwitchDefault>
                                                <span class="m--font-bold"> {{record.overdueDay}}</span>
                                            </div>
                                        </div>
                                    </th>
                                    <th style="width: 230px">
                                        {{ record.remarks}}
                                    </th>
                                </tr>
                            </ng-template>
                        </p-table>
                        <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
                            {{'NoData' | localize}}
                        </div>
                        <div class="primeng-paging-container">
                            <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage" #paginator
                                (onPageChange)="getDeliveryOrderList($event)" [totalRecords]="primengTableHelper.totalRecordsCount"
                                [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">

                            </p-paginator>
                            <span class="total-records-count">
                                {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
                            </span>
                        </div>
                    </div>
                    <!--<Primeng-TurboTable-End>-->
                </div>
            </div>
        </div>
    </div>

    <!-- <flowworkauditdetailmodel #flowworkauditdetailmodel></flowworkauditdetailmodel> -->
    <!-- <processingOrderList #processingOrderList></processingOrderList>
      <flowworkauditmodel #flowworkauditform></flowworkauditmodel> -->

</div>
